﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Wicresoft.UnifyShow.Business
{
    public interface IUser_X
    {
        List<UserAndSiteModel> GetSiteIDByName(string name);
        List<SiteBranchModel> GetSiteBranchByID(decimal ID);
        SiteBranchModel GetSiteBranchBySiteID(decimal ID);
        User_XModel GetUserByID(decimal ID);
        User_XModel GetUserByPeopleNo(string ID);
        SFUser_XModel GetUserByIDSF(decimal ID);
        Decimal GetCountOfTheAllSite();
        User_XModel GetUser_XByName(string name);
        List<User_XModel> GetListPageAndSortUser_X(out Decimal totalRecords, int pageSize = -1, int pageIndex = -1,
            string sortName = "DisplayName", string sortDirection = "Ascending"/*Ascending,Descending*/, string name = "", string displayname = "");

        List<User_XModel> GetListPageAndSortUser_X(out Decimal totalRecords, string companyName, int pageSize = -1, int pageIndex = -1,
            string sortName = "DisplayName", string sortDirection = "Ascending" /*Ascending,Descending*/, string name = "", string displayname = "");

        string UpdateRoleByUserID(SFUser_XModel model, List<decimal> roles_US, List<decimal> roles_GJ);

        int ChangePassword(string login, string pass);

        int Create(SFUser_XModel model, out string resultStr);

        List<SupportGroupCompany> GetGroupsByCompany(string Company, string type);

        List<SupportGroupCompany> GetPeople(string Company, string Group, string type);

        List<SupportGroupCompany> GetPeoples(string Company, string type);

        List<User_XModel> GetUserListByQueryParameter(out decimal totalCount, QueryString query, Nullable<int> pageIndex, Nullable<int> pageSize, string sort = "DisplayName", string order = "Descending");

        bool Exist(string loginName);

        int UpdateUserSiteTable(SFUser_XModel model);
        int DeleteUserSiteInfo(SFUser_XModel model);
    }
}
